package cn.ytzb.controller;

import cn.ytzb.pojo.Admin;
import cn.ytzb.service.AdminService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author XiaoMo
 * @Date 2022/3/15 11:25
 * @Version 1.0
 */
@RestController
public class AdminController {

    @Resource
    private AdminService adminService;

    @GetMapping("/get/{id}")
    public Admin findById(@PathVariable Integer id) {
        Admin admin = adminService.findById(id);
        return admin;
    }

}
